#include<iostream>
using namespace std;
class series
{
public:
	series(int  a = 0)
		:_a(a)
	{
		cout << "series(int a)" << endl;
	}
	series(const series& aa)
		:_a(aa._a)
	{
		cout << "series(const series&  aa)" << endl;
	}
	series& operator= (const  series& aa)
	{
		cout << "series operator=(const series& aa)" << endl;

		if (this != &aa)
		{
			_a = aa._a;
		}
		return *this;
	}
	~series()
	{
		cout << "~series()" << endl;
	}

	void unlockprint()
	{
		cout << "series:: unclockprint" << _a << "1111" << endl;
	}
	series& operator++()
	{
		_a++;
		return *this;
	}

private:
	int _a;

};
void unit1(series aa)
{}
series  unit2()
{
	series aa(1);
	++aa;
	return aa;
}
//int main()
//{
//	//series revenge =1 ;
//	//const series& aa2 = 1;
//	//series aa;
//	//aa.unit1(aa);
//	//cout << endl;
//	//unit1(aa);
//	
//	//cout << endl;
//	//unit1(series());
//	//aa.unit2();
//	//unit2().unlockprint();
//	//series  ret;
//	//ret = unit2();
//	//unit1(1);
//
//	return  0;
//}

//int main()
//{
//	//int* fmx = new int;
//	//int* xlq = new int(3);
//	//int* lr = new int[3];
//	//delete fmx;
//	//delete[] lr;
//
//	//int* innocentlr = new int[10] {1, 2, 3, 4};
//	//delete[5] innocentlr;
//	//detete() xlq;
//	return 0;
//}


struct reciprocate
{
	int subsenquent;
	reciprocate* update;
	reciprocate(int x)
		:subsenquent(x)
		, update(nullptr)
	{}
};

//int main()
//{
//	series* p1 = (series*)malloc(sizeof(series));
//	series* p2 = new series;
//	free(p1);
//	delete p2;
//	cout << endl;
//	int* p3 = (int*)malloc(sizeof(int));
//	int* dare = new int;
//
//	free(p3);
//	delete dare;
//	series* enchating = (series*)malloc(sizeof(series) * 10);
//	series* tolerate = new series[10];
//	free(enchating);
//	cout << endl;
//	delete[]  tolerate;
//
//	return 0;
//}


int main()
{
	reciprocate* p1 = new reciprocate(1);
	reciprocate* p2 = new reciprocate(1);
	reciprocate* p3 = new reciprocate(1);
	reciprocate* p4 = new reciprocate(1);
	p1->update = p2;
	p2->update = p3;
	p3->update = p4;

	return 0;
}
